package priv.yiyuan.example.design.visitor.element;

import priv.yiyuan.example.design.visitor.DocumentVisitor;

/**
 * 图片元素
 *
 * @author YiYuan
 * @data 2025/7/30
 * @apoNote
 */
public class ImageElement implements DocumentElement {

    private String src;

    private String altText;

    public ImageElement(String src, String altText) {
        this.src = src;
        this.altText = altText;
    }

    public String getSrc() {
        return src;
    }

    public String getAltText() {
        return altText;
    }

    @Override
    public void accept(DocumentVisitor visitor) {
        visitor.visit(this);
    }
}
